﻿using System;
using System.Runtime.InteropServices;

namespace OculusVR.Rift.Mono.NativeBridge
{
	public abstract class Wrappers
	{
		[DllImport("libOculusVR.Rift.OSX.Wrapper")] public static extern IntPtr new_System ();
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr delete_System (IntPtr obj);	
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void System_Init();
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void System_Destroy();
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern bool System_IsInitialized();


		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr delete_DeviceManager(IntPtr obj);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr DeviceManager_Create();
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr DeviceManager_EnumerateHMDDevices(IntPtr deviceManager);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void delete_HMDDeviceEnumerator(IntPtr enumerator);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr HMDDeviceEnumerator_CreateDevice(IntPtr enumerator);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void delete_HMDDevice(IntPtr hmdDevice);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr HMDDevice_GetProfile(IntPtr hmdDevice);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr HMDDevice_GetDeviceInfo(IntPtr device);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr HMDDevice_GetSensor(IntPtr device);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr HMDDevice_SetMessageHandler(IntPtr device, IntPtr callback);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr delete_Profile(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern int Profile_GetGender(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void Profile_SetGender(IntPtr profile, int gender);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float Profile_GetPlayerHeight(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void Profile_SetPlayerHeight(IntPtr profile, float playerHeight);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float Profile_GetIPD(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void Profile_SetIPD(IntPtr profile, float ipd);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float Profile_GetEyeHeight(IntPtr profile);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float delete_HMDProfile(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern int HMDProfile_GetLL(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void HMDProfile_SetLL(IntPtr profile, int ll);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern int HMDProfile_GetLR(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void HMDProfile_SetLR(IntPtr profile, int lr);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern int HMDProfile_GetRL(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void HMDProfile_SetRL(IntPtr profile, int rl);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern int HMDProfile_GetRR(IntPtr profile);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void HMDProfile_SetRR(IntPtr profile, int rr);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr delete_HMDInfo(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern uint HMDInfo_GetHResolution(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern uint HMDInfo_GetVResolution(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float HMDInfo_GetHScreenSize(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float HMDInfo_GetVScreenSize(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float HMDInfo_GetVScreenCenter(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float HMDInfo_GetEyeToScreenDistance(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float HMDInfo_GetLensSeparationDistance(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float HMDInfo_GetInterpupillaryDistance(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr HMDInfo_GetDistortionK(IntPtr hmdInfo);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr HMDInfo_GetDisplayDeviceName(IntPtr hmdInfo);		
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern int HMDInfo_GetDisplayId(IntPtr hmdInfo);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr delete_ProfileType(IntPtr profileType);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void delete_SensorDevice(IntPtr sensorDevice);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void SensorDevice_SetCoordinateFrame (IntPtr sensorDevice, int coordFrame);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern int SensorDevice_GetCoordinateFrame(IntPtr sensorDevice);

		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void delete_SensorFusion(IntPtr sensorFusion);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr new_SensorFusionFromSensorDevice(IntPtr sensorDevice);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr SensorFusion_GetOrientation(IntPtr sensorFusion, out double x, out double y, out double z, out double w);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr SensorFusion_GetPredictedOrientation(IntPtr sensorFusion, float predictDT, out double x, out double y, out double z, out double w);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr SensorFusion_GetPredictedOrientationDefaultDT(IntPtr sensorFusion, out double x, out double y, out double z, out double w);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr SensorFusion_GetAcceleration(IntPtr sensorFusion, out double x, out double y, out double z);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern IntPtr SensorFusion_GetAngularVelocity(IntPtr sensorFusion, out double x, out double y, out double z);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern float SensorFusion_GetPredictionDT (IntPtr sensorFusion);
		[DllImport("libOculusVR.Rift.OSX.Wrapper")]	public static extern void SensorFusion_SetPredictionDT (IntPtr sensorFusion, float predictionDT);
	}
}
	